<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>单个主题</title>
</head>
<body>
{% extends "learning_logs/base.html" %}

{% block header %}
    <h2>{{ topic.text }}</h2>
{% endblock header %}

{% block content %}

    {#        <p>{{ topic.text }}</p>#}


    {% for entry in entries %}

        <div class="panel panel-default">
            <div class="panel-heading">
                <h3>
                    {{ entry.add_time|date:"Y-m-d h:i:s" }}
                    <small>

                        <a href="{% url 'll:edit_entry' entry.id %}">编辑entry</a>
                    </small>

                </h3>
            </div>
            <div class="panel-body">
                {{ entry.text|linebreaks }}
            </div>
        </div>
    {% empty %}
        there are no entry for this topic,topic id =={{ topic.id }}
    {% endfor %}

    <p><a href="{% url 'll:new_entry' topic.id %}">新建entry</a></p>
{% endblock content %}
</body>
</html>